window: Fix child wfh size request
authorBenjamin Otte <otte@redhat.com>
Tue, 17 Sep 2013 13:52:27 +0000 (15:52 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 17 Sep 2013 13:52:27 +0000 (15:52 +0200)
We need to subtract border_width from the size we're passing to the
children hfw functions as those are added by ourselves.

Fixes the window-border-width.ui reftest.

gtk/gtkwindow.c

index 93422cbbd96a092ae1db732f449cd5cbf55afb09..a8aecebcd920ecfee61d39ec8321436d0e211058 100644 (file)
@@ -7792,6 +7792,8 @@ gtk_window_get_preferred_width_for_height (GtkWidget *widget,
 
   border_width = gtk_container_get_border_width (GTK_CONTAINER (window));
 
+  height -= 2 * border_width;
+
   if (priv->decorated &&
       !priv->fullscreen)
     {
@@ -7896,6 +7898,8 @@ gtk_window_get_preferred_height_for_width (GtkWidget *widget,
 
   border_width = gtk_container_get_border_width (GTK_CONTAINER (window));
 
+  width -= 2 * border_width;
+
   if (priv->decorated &&
       !priv->fullscreen)
     {